<?php
include  $_SERVER['DOCUMENT_ROOT'] . "/modules/config/index.php";
session_start();

global $config;
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];

if (array_key_exists($username,$config["admin"])) {
	 if ($password ==  $config["admin"][$username]["password"]) {
	 		$_SESSION['username'] = $username;
	 		echo "1";
	 } else echo "0";
} else echo "-1 {$username} {$password}";

?>